package com.sc.sc250601.cook.mapper;

import com.sc.sc250601.cook.pojo.Favorite;
import com.sc.sc250601.cook.pojo.RecipeBrowseDTO;

import java.util.List;

public interface FavoriteMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Favorite record);

    int insertSelective(Favorite record);

    Favorite selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Favorite record);

    int updateByPrimaryKey(Favorite record);

    //判断是否已收藏
    Favorite selectByUserIdAndFavoritedIdAndFavoritedType(Favorite f);
    // 取消收藏关系
    int deleteFavorited(Favorite f);

    //获取收藏列表
    List<RecipeBrowseDTO> getFavoriteList(Long userId);

}